package com.daohang.dh.manager.impl;

import com.daohang.dh.entity.MidpDirFilesEntity;
import com.daohang.dh.manager.MidpDirFilesManager;
import com.daohang.dh.dao.MidpDirFilesMapper;
import net.chenlin.dp.common.entity.Page;
import net.chenlin.dp.common.entity.Query;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 未打标签文件表
 *
 * @author xiaomei
 * @email yczclcn@163.com
 * @url www.chenlintech.com
 * @date 2018/05/23
 */
@Component("midpDirFilesManager")
public class MidpDirFilesManagerImpl implements MidpDirFilesManager {

	@Autowired
	private MidpDirFilesMapper midpDirFilesMapper;
	

	@Override
	public List<MidpDirFilesEntity> listMidpDirFiles(Page<MidpDirFilesEntity> page, Query search) {
		return midpDirFilesMapper.listForPage(page, search);
	}

	@Override
	public int saveMidpDirFiles(MidpDirFilesEntity midpDirFiles) {
		return midpDirFilesMapper.save(midpDirFiles);
	}

	@Override
	public MidpDirFilesEntity getMidpDirFilesById(Long id) {
		MidpDirFilesEntity midpDirFiles = midpDirFilesMapper.getObjectById(id);
		return midpDirFiles;
	}

	@Override
	public int updateMidpDirFiles(MidpDirFilesEntity midpDirFiles) {
		return midpDirFilesMapper.update(midpDirFiles);
	}

	@Override
	public int batchRemove(Long[] id) {
		int count = midpDirFilesMapper.batchRemove(id);
		return count;
	}
	
}
